package cn.com.bluemoon.daps.standard.vo;

import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 指标表与模型id关系表
 *
 * @author Jarod.Kong
 * @date 2021/9/6 11:48
 */
@Data
public class IndexStandardRelateDwModelVo implements Serializable {
    private static final long serialVersionUID = 1L;
    /* 标准id（需要转为标准唯一id）、数仓模型id、表id、字段id */
    @NotNull(message = "标准id不可为空")
    private String standardId;
    @NotNull(message = "模型id不可为空")
    private String dwModelId;
    @NotNull(message = "模型表id不可为空")
    private String dwTableId;
    @NotNull(message = "模型表字段id不可为空")
    private String dwTableFieldId;

    public boolean validParam(){
        return StringUtils.isNoneBlank(this.standardId, this.dwModelId, this.dwTableId, this.dwTableFieldId);
    }
}
